﻿//------------------------------------------------------------------------------
// This file is part of MistLand project in Nirvana.
// Copyright © 2016-2016 Nirvana Technology Co., Ltd.
// All Right Reserved.
//------------------------------------------------------------------------------

#ifndef SHADERRIM_INCLUDED
#define SHADERRIM_INCLUDED

// Reflection contant buffer.
CBUFFER_START(ShaderRim)
    fixed4 _RimColor;
    half _RimTime;
CBUFFER_END

inline void applyRim(inout half4 finalColor)
{
#ifdef ENABLE_RIM
    finalColor +=_RimColor * _RimTime;
#endif
}

#if defined(ENABLE_RIM)
#define ApplyRim(finalColor) applyRim(finalColor)
#else
#define ApplyRim(finalColor)
#endif

#endif
